package com.seu.nic.component.crontab;

import com.seu.nic.component.service.AdcService;
import com.seu.nic.component.unit.AdcResult;
import com.seu.nic.component.utils.CommonUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.exception.ExceptionUtils;

import java.util.concurrent.ArrayBlockingQueue;

@Slf4j
public class AdcCrontab implements Runnable {

    private AdcService adcService;

    private ArrayBlockingQueue<AdcResult> adcResultQueue;

    public AdcCrontab(
            ArrayBlockingQueue<AdcResult> adcResultQueue
            ) {
        this.adcResultQueue = adcResultQueue;
    }

    public void run() {
        log.info("AdcCrontab start");
        while (true) {
            try {

            }
            catch (Throwable t){
                log.error("AdcCrontab error. " + ExceptionUtils.getFullStackTrace(t));
            }
            finally {
                CommonUtils.waitForSeconds(1);
            }
        }
    }

}
